package com.fr.dialog;

import com.fr.base.Nameable;
import com.fr.base.core.BaseCoreUtils;
import com.fr.base.core.ComparatorUtils;
import java.io.Serializable;

public class NameObject
  implements Nameable, Cloneable, Serializable
{
  private String name;
  private Object object;

  public NameObject()
  {
  }

  public NameObject(String paramString, Object paramObject)
  {
    setName(paramString);
    setObject(paramObject);
  }

  public String getName()
  {
    return this.name;
  }

  public void setName(String paramString)
  {
    this.name = paramString;
  }

  public Object getObject()
  {
    return this.object;
  }

  public void setObject(Object paramObject)
  {
    this.object = paramObject;
  }

  public boolean equals(Object paramObject)
  {
    if (!(paramObject instanceof NameObject))
      return false;
    if (this == paramObject)
      return true;
    NameObject localNameObject = (NameObject)paramObject;
    return ((ComparatorUtils.equals(getName(), localNameObject.getName())) && (ComparatorUtils.equals(getObject(), localNameObject.getObject())));
  }

  public String toString()
  {
    return "Name:" + getName() + "\tObject:" + getObject();
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    NameObject localNameObject = (NameObject)super.clone();
    localNameObject.object = BaseCoreUtils.cloneObject(this.object);
    return localNameObject;
  }
}